<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title>easygpt</title><script defer="defer" src="js/chunk-vendors.5e9e70a2.js"></script><script defer="defer" src="js/app.799fe05c.js"></script><link href="css/chunk-vendors.650ca82a.css" rel="stylesheet"><link href="css/app.cb48e9e6.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but easygpt doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script>document.addEventListener('plusready', () => {
      //等待plus ready后再调用5+ API：
      let first = null
      const webview = plus.webview.currentWebview()

      window.$5PlusAPI = {
        switchTheme(theme) {
          if (theme) {
            plus.navigator.setStatusBarStyle('dark')
            plus.navigator.setStatusBarBackground('#ffffff')
          } else {
            plus.navigator.setStatusBarStyle('light')
            plus.navigator.setStatusBarBackground('#282C34')
          }
        }
      }

      window.$5PlusAPI.switchTheme(JSON.parse(localStorage.setting).theme)

      plus.key.addEventListener('backbutton', () => {
        webview.canBack((e) => {
          if (e.canBack) {
            webview.back()
          } else {
            //首次按键，提示‘再按一次退出应用’
            if (!first) {
              //获取第一次点击的时间戳
              first = new Date().getTime()
              //通过H5+ API 调用Android 上的toast 提示框
              plus.nativeUI.toast("再按一次退出应用", {
                duration: 'short'
              })
              setTimeout(() => {
                first = null
              }, 1000)
            } else {
              if (new Date().getTime() - first < 1000) {
                //获取第二次点击的时间戳, 两次之差 小于 1000ms 说明1s点击了两次,
                plus.runtime.quit() //退出应用
                // webview.close(); //hide,quit
              }
            }
          }
        })
      })
    })</script></body></html>